package com.bite.logistics.listener;

import com.bite.order.model.OrderInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "order.create")
public class OrderListener {
    @RabbitHandler
    public void handleMessage(String orderInfo) {
        System.out.println("接收订单信息String："+orderInfo);
    }
    @RabbitHandler
    public void handleMessage2(OrderInfo orderInfo) {
        System.out.println("接收订单信息OrderInfo："+orderInfo);
    }
}
